# Reproduce results of Table 2
# R version 4.1.1 (2021-08-10)
#
# Code for robust standard errors in rperm_fun.R is from
# https://economictheoryblog.com/2016/08/07/robust-standard-errors-in-r-function/
#
# The first four commands involve bootstrap and are take substantial time to run

R CMD BATCH --no-save --no-restore '--args 1' rperm_did.R did-1.out &
R CMD BATCH --no-save --no-restore '--args 3' rperm_did.R did-3.out &
R CMD BATCH --no-save --no-restore '--args 5' rperm_did.R did-5.out &
R CMD BATCH --no-save --no-restore '--args 7' rperm_did.R did-7.out &

R CMD BATCH --no-save --no-restore '--args 1' rperm_did_crs.R did_crs-1.out &
R CMD BATCH --no-save --no-restore '--args 3' rperm_did_crs.R did_crs-3.out &
R CMD BATCH --no-save --no-restore '--args 5' rperm_did_crs.R did_crs-5.out &
R CMD BATCH --no-save --no-restore '--args 7' rperm_did_crs.R did_crs-7.out &